package photorganizer.common.id;

public class TimeIdGenerator implements IdGenerator {

	private long nextId;

	public TimeIdGenerator() {
		this(0L);
	}

	public TimeIdGenerator(long reference) {
		nextId = System.currentTimeMillis() - reference;
	}

	/* (non-Javadoc)
	 * @see photorganizer.common.id.IdGenerator#generateId()
	 */
	public synchronized Long generateId() {
		return nextId++;
	}

}
